package com.cherry.ssmsimple.service.impl;

import com.cherry.ssmsimple.dao.BlogMapper;
import com.cherry.ssmsimple.pojo.Blog;
import com.cherry.ssmsimple.service.BlogService;

import java.util.List;

public class BlogServiceImpl implements BlogService {

    BlogMapper mapper;

    public void setMapper(BlogMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public List<Blog> findAll() {
        return mapper.findAll();
    }

    @Override
    public int addBlog(Blog blog) {
        return mapper.addBlog(blog);
    }

    @Override
    public Blog findById(String id) {
        return mapper.findById(id);
    }

    @Override
    public int update(Blog blog) {
        return mapper.update(blog);
    }

    @Override
    public int delById(String id) {
        return mapper.delById(id);
    }
}
